home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / breeze30.zip / DEMO.PRG < prev    next >
Text File  |  1993-01-04  |  33KB  |  1,395 lines

  1. *-----------------------COPYRIGHT 1987,1988 (c) LOGITEK---------------------
  2. *
  3. *   All Registered Users are free to modify and use this source code
  4. *   as they see fit, with no royalties, obligations or fees to LOGITEK.
  5. *
  6. *-----------------------------------------------------------------------
  7. set scoreboard off
  8. set cursor off
  9.  
  10. ************************
  11. ** Check Monitor Type **
  12. ************************
  13.  
  14. if(scrmode() = 7)
  15.     shaded = 0
  16.     color1 = "w+/n"
  17.     color2 = "n/w"
  18.     color3 = "w+/n"
  19.     color4 = "w+/n"
  20.     color5 = "n/w"
  21.     color6 = "w+/n"
  22.     color7 = "n/w"
  23.     color8 = "w/n"
  24.     color9 = "w+/n"
  25.     color10 = "w+/n"
  26.     color11 = color10
  27.     color12 = "n/w"
  28.     color13 = "w/n"
  29.     color14 = "w+/n"
  30.     color15 = "n/w"
  31. else
  32.     shaded = 1
  33.     color1 = "r+/n"
  34.     color2 = "n/bg"
  35.     color3 = "rb/n"
  36.     color4 = "w/b"
  37.     color5 = "n/bg"
  38.     color6 = "n/bg"
  39.     color7 = "n/w"
  40.     color8 = "n/rb"
  41.     color9 = "w+/n"
  42.     color10 = "gr+/n"
  43.     color11 = "rb+/n"
  44.     color12 = "n/w"
  45.     color13 = "w/n"
  46.     color14 = "b/w"
  47.     color15 = "b/g"
  48. endif
  49.  
  50. ********************
  51. ** Set Up Windows **
  52. ********************
  53. do wind0 with color15
  54. do wind1 with color2
  55. do wind2 with color3
  56. do wind3 with color4
  57. do wind4 with color5
  58.  
  59.  
  60. clearscr(0,0,24,79,color7,32)
  61.  
  62. box(4,3,22,77,1,1,color7)
  63.  
  64. set color to &color14
  65. @ 4,20 say chr(17)
  66. set color to &color4
  67. @ 4,21 say " A  TRUE  Windowing Library For Clipper " 
  68. set color to &color14
  69. @ 4,61 say chr(16)
  70.  
  71. if(scrmode() = 7)
  72.     color4 = "n/w"
  73. endif
  74.  
  75. do title with color6                 && Moving boxes for title
  76.  
  77. wselect(1)                           && First Box
  78. wuse(5,10,5,0,color9)
  79. wframe()
  80. wdisplay()
  81.  
  82. wselect(2)                           && Second Box
  83. wuse(5,10,14,0,color6)
  84. wframe()
  85. wdisplay()
  86.  
  87. wselect(3)                           && third Box
  88. wuse(5,10,20,35,color10)
  89. wframe()
  90. wdisplay()
  91.  
  92. wselect(4)                           && Fourth Box
  93. wuse(5,10,14,70,color1)
  94. wframe()
  95. wdisplay()
  96.  
  97. wselect(5)                           && Fifth Box
  98. wuse(5,10,5,70,color11)
  99. wframe()
  100. wdisplay()
  101.  
  102. key = 0
  103.  
  104. currwind = 1
  105.  
  106. do while currwind < 6
  107.  
  108.     heigth = wrow(currwind)
  109.     width = wcolumn(currwind)
  110.  
  111.     do while wcolscr(currwind) < 12
  112.          sound(250,5)
  113.          wshift(2,currwind)
  114.          sound(125,5)
  115.     enddo
  116.  
  117.     do while wcolscr(currwind) > 56
  118.          sound(250,5)
  119.          wshift(4,currwind)
  120.          sound(125,5)
  121.     enddo
  122.  
  123.  
  124.     do while wrowscr(currwind) + (heigth - 1) < 16
  125.          sound(250,5)
  126.          wshift(3,currwind)
  127.          sound(125,5)
  128.     enddo
  129.  
  130.     do while wcolscr(currwind) < 35
  131.          sound(250,5)
  132.          wshift(2,currwind)
  133.          sound(125,5)
  134.     enddo
  135.  
  136.     do while wcolscr(currwind) > 35
  137.          sound(250,5)
  138.          wshift(4,currwind)
  139.          sound(125,5)
  140.     enddo
  141.  
  142.     do while wrowscr(currwind) > 9
  143.          sound(250,5)
  144.          wshift(1,currwind)
  145.          sound(125,5)
  146.     enddo
  147.  
  148.  
  149. **********************
  150. ** Display The Info **
  151. **********************
  152.  
  153.     wzoom(2000,600,50,(79+currwind))
  154.     wdisplay((79 + currwind))
  155.     key = keycode()
  156.     wclose((79 + currwind))
  157.  
  158.     currwind = currwind + 1
  159.  
  160. enddo
  161.  
  162. wrelease(1)
  163. wrelease(2)
  164. wrelease(3)
  165. wrelease(4)
  166. wrelease(5)
  167. wrelease(80)            && Release all unneeded windows
  168. wrelease(81)
  169. wrelease(82)
  170. wrelease(83)
  171. wrelease(84)
  172.  
  173. clearscr(5,4,21,76,color12,' ')
  174.  
  175. *******************
  176. ** MENU SELECTION *
  177. *******************
  178. oldcntr = 1
  179. menucntr = 1
  180. code = 0
  181.  
  182. shade(5,5,7,58,color4,color12)
  183. box(5,5,7,58,3)
  184.  
  185. printstr(6,7,"Windows")
  186. printstr(6,19,"Screen Output")
  187. printstr(6,37,"Calculator")
  188. printstr(6,52,"Menus")
  189.  
  190. temp1 = color9
  191. temp2 = color12
  192.  
  193. if(scrmode() <> 7)
  194.     color9 = "b/w"
  195.     color12 ="w/b"
  196. endif
  197.  
  198. set color to &color9
  199. @ 6,7 say "Windows"
  200. set color to &color12
  201. do while code <> 1
  202.  
  203.     code = keycode()
  204.  
  205.     oldcntr = menucntr
  206.     do case
  207.          case code = 75
  208.               menucntr = menucntr - 1
  209.          case code = 77
  210.               menucntr = menucntr + 1
  211.          case code = 28
  212.               menucntr = menucntr
  213.          case code = 17
  214.               menucntr = 1
  215.          case code = 31
  216.               menucntr = 2
  217.          case code = 46
  218.               menucntr = 3
  219.          case code = 50
  220.               menucntr = 4
  221.     endcase
  222.  
  223.     if menucntr < 1
  224.          menucntr = 4
  225.     endif
  226.     if menucntr > 4
  227.          menucntr = 1
  228.     endif
  229.  
  230.     set color to &color12
  231.     do case
  232.          case oldcntr = 1
  233.               @ 6,7 say "Windows"
  234.          case oldcntr = 2
  235.               @ 6,19 say "Screen Output"
  236.          case oldcntr = 3
  237.               @ 6,37 say "Calculator"
  238.          case oldcntr = 4
  239.               @ 6,52 say "Menus"
  240.     endcase          
  241.  
  242.     set color to &color9
  243.     do case
  244.          case menucntr = 1
  245.               @ 6,7 say "Windows"
  246.               set color to &color12
  247.               if code = 28 .or. code = 17
  248.                  do saverest
  249.               endif
  250.          case menucntr = 2
  251.               @ 6,19 say "Screen Output"
  252.               set color to &color12
  253.               if code = 28 .or. code = 31
  254.                   do spdemos
  255.                endif
  256.          case menucntr = 3
  257.               @ 6,37 say "Calculator"
  258.               set color to &color12
  259.               if code = 28 .or. code = 46
  260.                   wselect(81)
  261.                   wuse(9,60,10,10,color9)
  262.                   wframe(2)
  263.                   wprint(2,2,"This demonstration 'pops' a calculator onto the screen.")
  264.                   wprint(3,2,"Use the cursor keys to move the calculator  around  the")
  265.                   wprint(4,2,"screen, the calculator is functional, source  code  for")
  266.                   wprint(5,2,"calculator IS supplied with the library.")
  267.                   wprint(7,2,"               Press any key to start.")
  268.                   wdisplay()
  269.                   keycode()
  270.                   wclose()
  271.                   wrelease()
  272.                   do calc with color4,color2,5,5,1
  273.                 endif
  274.          case menucntr = 4
  275.                 @ 6,52 say "Menus"
  276.                 set color to &color12
  277.                 if code = 28 .or. code = 50
  278.                     wselect(81)
  279.                     wuse(9,60,10,10,color9)
  280.                     wframe(2)
  281.                     wprint(2,2,"This demonstration uses the windowing capabilities")
  282.                     wprint(3,2,"for a very general popdown menu system.  This simple")
  283.                     wprint(4,2,"system could be easily modified for your application's")
  284.                     wprint(5,2,"specific needs, giving it that hi-tech look !")
  285.                     wprint(7,2,"               Press any key to start.")
  286.                     wdisplay()
  287.                     keycode()
  288.                     wclose()
  289.                     wrelease()
  290.                     do popdowns
  291.                     menucntr = 4
  292.                 endif
  293.     endcase          
  294.     set color to &color9
  295.     clear typeahead
  296.  
  297. enddo
  298.  
  299.  
  300. *******************
  301. **               **
  302. ** Ending Screen **
  303. **               **
  304. *******************                  
  305.  
  306. @ 23,5 say " "
  307. clearscr(0,0,24,79,"w+/n",176)
  308. box(0,0,24,79,5)
  309.  
  310. printstr(5,16,"Free Information About THE BREEZE Library Can")
  311. printstr(6,16,"Be Obtained By Calling:")
  312. printstr(8,30,"703-486-3518")
  313. printstr(10,35,"OR")
  314.  
  315. printstr(12,16,"Write To:")
  316. printstr(14,25,"LOGITEK")
  317. printstr(15,25,"P.O. Box 4603")
  318. printstr(16,25,"Arlington, Virginia 22204")
  319.  
  320. printstr(18,25,"LOGITEK BBS Support: 703-450-7864")
  321.  
  322. keycode()
  323. set cursor on
  324.  
  325. return
  326.  
  327. *********************************************
  328. procedure title
  329. *********************************************
  330.  
  331. wselect(1)                           && First Box
  332. wuse(3,5,19,0,color6,shaded,color7)
  333. *wframe()
  334. wprint(1,2,"E")
  335. wdisplay()
  336.  
  337. wselect(2)                           && Second Box
  338. wuse(3,5,19,6,color6,shaded,color7)
  339. *wframe()
  340. wprint(1,2,"Z")
  341. wdisplay()
  342.  
  343. wselect(3)                           && third Box
  344. wuse(3,5,19,12,color6,shaded,color7)
  345. *wframe()
  346. wprint(1,2,"E")
  347. wdisplay()
  348.  
  349. wselect(4)                           && Fourth Box
  350. wuse(3,5,19,18,color6,shaded,color7)
  351. *wframe()
  352. wprint(1,2,"E")
  353. wdisplay()
  354.  
  355. wselect(5)                           && Fifth Box
  356. wuse(3,5,19,24,color6,shaded,color7)
  357. *wframe()
  358. wprint(1,2,"R")
  359. wdisplay()
  360.  
  361. wselect(6)                           && Sixth Box
  362. wuse(3,5,19,30,color6,shaded,color7)
  363. *wframe()
  364. wprint(1,2,"B")
  365. wdisplay()
  366.  
  367. wselect(7)                           && Seventh Box
  368. wuse(3,5,19,42,color6,shaded,color7)
  369. *wframe()
  370. wprint(1,2,"E")
  371. wdisplay()
  372.  
  373. wselect(8)                           && Eighth Box
  374. wuse(3,5,19,48,color6,shaded,color7)
  375. *wframe()
  376. wprint(1,2,"H")
  377. wdisplay()
  378.  
  379. wselect(9)                           && ninth Box
  380. wuse(3,5,19,54,color6,shaded,color7)
  381. *wframe()
  382. wprint(1,2,"T")
  383. wdisplay()
  384.  
  385. windptr = 9
  386.  
  387. windptr = 9
  388. do while windptr > 0
  389.    cntr = 0
  390.    do while cntr < 120
  391.  
  392.                 do case
  393.                    case wrowscr(windptr) = 0
  394.                         goflag = 0
  395.                         do case
  396.                                 case windptr = 9 .and. wcolscr(9) > 10
  397.                                         goflag = 1
  398.                                 case windptr = 8 .and. wcolscr(8) > 16
  399.                                         goflag = 1
  400.                                 case windptr = 7 .and. wcolscr(7) > 22
  401.                                         goflag = 1
  402.                                 case windptr = 6 .and. wcolscr(6) > 34
  403.                                         goflag = 1
  404.                                 case windptr = 5 .and. wcolscr(5) > 40
  405.                                         goflag = 1
  406.                                 case windptr = 4 .and. wcolscr(4) > 46
  407.                                         goflag = 1
  408.                                 case windptr = 3 .and. wcolscr(3) > 52
  409.                                         goflag = 1
  410.                                 case windptr = 2 .and. wcolscr(2) > 58
  411.                                         goflag = 1
  412.                                 case windptr = 1 .and. wcolscr(1) > 64
  413.                                         goflag = 1
  414.                                 case windptr = 1 .and. wcolscr(1) = 64
  415.                                         cntr = 400
  416.                         endcase
  417.                         if goflag = 1 
  418.                              wshift(4,windptr)
  419.                         else
  420.                              sound(200,25)
  421.                              cntr = 200
  422.                         endif
  423.  
  424.                    case wrowscr(windptr) = 1
  425.                         sound(200,10)
  426.                         wshift(1,windptr)
  427.                         tmpcntr = 0
  428.                         do while tmpcntr < 5
  429.                                 wshift(4,windptr)
  430.                                 tmpcntr = tmpcntr + 1
  431.                         enddo
  432.                         sound(800,10)
  433.                    case wcolscr(windptr) = 73 .and. wrowscr(windptr) = 19
  434.                         sound(200,10)
  435.                         wshift(2,windptr)
  436.                         tmpcntr = 0
  437.                         do while tmpcntr < 4
  438.                                 wshift(1,windptr)
  439.                                 tmpcntr = tmpcntr + 1
  440.                         enddo
  441.                         sound(800,10)
  442.                    case wcolscr(windptr) > 73 .and. wrowscr(windptr) > 1
  443.                         wshift(1,windptr)
  444.                    case wcolscr(windptr) < 73 .and. wrowscr(windptr) = 19
  445.                         wshift(2,windptr)
  446.                 endcase
  447.                 
  448.          cntr = cntr + 1
  449.     enddo
  450.     windptr = windptr - 1
  451. enddo
  452.  
  453. windptr = 1
  454. do while windptr < 10
  455.         wrelease(windptr)
  456.         windptr = windptr + 1
  457. enddo
  458.  
  459. windptr = 1
  460. do while windptr < 1000
  461.       windptr = windptr + 1
  462. enddo
  463.  
  464. return
  465.  
  466.  
  467.  
  468. **********************************************
  469.  
  470. procedure wind0
  471.  
  472. parameter color
  473.  
  474. **********************************************
  475.  
  476. wselect(80)
  477. wuse(23,75,1,2,color,1,"n/w")
  478. wframe()
  479.  
  480. wprint(1,4,"This  program  is  a  simple  demonstration  of  a  few  of  the ")
  481. wprint(2,4,"capabilities of the BREEZE  windowing  library.  The  program  was")
  482. wprint(3,4,"purposefully made to mimick the moving windows of Sidekick, giving")
  483. wprint(4,4,"you an idea of  how  fast  this  library  is.  This  program  ONLY")
  484. wprint(5,4,"uses a few of  the  special  windowing  functions,  the  following")
  485. wprint(6,4,"is a list of the more important windowing functions:")
  486. wprint( 7,4,"     WUSE()     - opens a window in memory")
  487. wprint( 8,4,"     WDISPLAY() - displays a window.")
  488. wprint( 9,4,"     WCLOSE()   - closes the window and restores screen")
  489. wprint(10,4,"     WRELEASE() - releases a window from memory.")
  490. wprint(11,4,"     WCOPY()    - copies a window to another window.")
  491. wprint(12,4,"     WSAVE()    - saves a window to a disk file.")
  492. wprint(13,4,"     WRESTORE() - restores a windows from a disk file.")
  493. wprint(14,4,"     WSELECT()  - selects a window as the active window.")
  494. wprint(15,4,"     WPRINT()   - prints to the active window")
  495. wprint(16,4,"     WFRAME()   - frames a window, and/or draws boxes on the window")
  496. wprint(17,4,"     WLINE()    - draws vertical and horizontal lines on a window")
  497. wprint(18,4,"     WSHIFT()   - moves a window one space in any direction.")
  498. wprint(19,4,"     WCLEAR()   - clears all or a portion of a window.")
  499. wprint(20,4,"     WMOVETO()  - moves a defined portion of the screen to a window.")
  500. wprint(21,4,"     WMOVFROM() - moves a defined portion of a window to the screen.")
  501.  
  502. return
  503.  
  504. **********************************************
  505.  
  506. procedure wind1
  507.  
  508. parameter color
  509.  
  510. **********************************************
  511.  
  512. wselect(81)
  513. wuse(13,50,5,15,color,1,"n/w")
  514. wframe()
  515.  
  516. wprint(1,15,"GENERAL  INFORMATION")
  517. wprint(3,3,"Windows  of  information  can  be   moved  or")
  518. wprint(4,3,"manipulated in any  manner a  programmer  may")
  519. wprint(5,3,"desire. THE BREEZE  allows Full  AND  PARTIAL")
  520. wprint(6,3,"screen saves to windows, as well as a host of")
  521. wprint(7,3,"other TRUE windowing functions.  This Library")
  522. wprint(8,3,"adds to CLIPPER the  windowing functions  now")
  523. wprint(9,3,"available  with the  Quicksilver  compiler !!")
  524.  
  525. return
  526.  
  527. ************************************************
  528.  
  529. procedure wind2
  530.  
  531. parameter color
  532.  
  533. ************************************************
  534.  
  535. wselect(82)
  536. wuse(11,50,5,15,color,1,"n/w")
  537. wframe()
  538.  
  539. wprint(1,14,"CLIPPER COMPATABILITY")
  540. wprint(3,4,"The functions that are provided with the")
  541. wprint(4,4,"BREEZE  are  100 percent compatible with ")
  542. wprint(5,4,"Clipper's  Extend  system.  NO  part  of ")
  543. wprint(6,4,"THE  BREEZE  is  'memory resident.'  All")
  544. wprint(7,4,"functions are linked during  the  normal")
  545. wprint(8,4,"'link' phase of your application !")
  546.  
  547. return
  548.  
  549. ************************************************
  550.  
  551. procedure wind3
  552.  
  553. parameter color
  554.  
  555. ************************************************
  556.  
  557. wselect(83)
  558. wuse(13,50,5,15,color,1,"n/w")
  559. wframe()
  560.  
  561. wprint( 1,14,"HARDWARE COMPATABILITY")
  562. wprint( 3,2,"THE BREEZE  will work with  any  truly  100%")
  563. wprint( 4,2,"IBM PC compatible machine running DOS 2.0 and")
  564. wprint( 5,2,"later.   Different  video  adapters  are ")
  565. wprint( 6,2,"transparent to THE BREEZE, because it adjusts")
  566. wprint( 7,2,"automatically to the type  of  video  adapter")
  567. wprint( 8,2,"board the machine has, CGA,EGA or MONO.  This")
  568. wprint( 9,2,"makes any program  written  with  THE  BREEZE ")
  569. wprint(10,2,"portable  to  many  different  adapter ")
  570. wprint(11,2,"environments !!")
  571.  
  572.  
  573. return
  574.  
  575. ************************************************
  576.  
  577. procedure wind4
  578.  
  579. parameter color
  580.  
  581. ************************************************
  582.  
  583. wselect(84)
  584. wuse(9,50,5,15,color,1,"n/w")
  585. wframe()
  586.  
  587. wprint(1,11,"dBASE COMPILER COMPATABILITY")
  588. wprint(3,2,"THE BREEZE  will work with  the  Nantucket")
  589. wprint(4,2,"Clipper  compiler,  Autumn  1986  version,")
  590. wprint(5,2,"and the latest Clipper version, Summer 1987.")
  591. wprint(6,2,"Additional versions will be made available")
  592. wprint(7,2,"for interpreted  dBASE  at  a later  date.")
  593.  
  594. return
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601. ****************************************************************
  602. procedure spdemos
  603. ****************************************************************
  604.  
  605. wselect(1)
  606. wuse(25,80,0,0,color13)
  607. wmoveto(0,0,24,79,1,0,0)             && save screen
  608.  
  609. wselect(2)
  610. wuse(9,60,10,10,color9)
  611. wframe(2)
  612.  
  613. wprint(1,2,"This demonstration will use a  BREEZE  function to fill")
  614. wprint(2,2,"the screen  several  times.   The  program  will  pause")
  615. wprint(3,2,"between each fill, press any key to go to the next fill.")
  616. wprint(4,2,"These simple screen fills are an example of  the  speed")
  617. wprint(5,2,"this library possesses.")
  618. wprint(7,2,"                Press any key to start.")
  619. wdisplay()
  620.  
  621. keycode()
  622. wclose()  
  623. wrelease(2)
  624.  
  625. clearscr(0,0,24,79,color7,176)
  626. keycode()
  627. clearscr(0,0,24,79,color3,216)
  628. keycode()
  629. clearscr(0,0,12,39,color7,42)
  630. clearscr(0,40,12,79,color1,177)
  631. clearscr(13,0,24,39,color10,254)
  632. clearscr(13,40,24,79,color9,206)
  633. keycode()
  634.  
  635. wmovfrom(0,0,24,79,1,0,0)             && Restore Screen
  636.  
  637. wrelease(1)                           && Release the window
  638.  
  639. return
  640.  
  641. *************************************************************************
  642. procedure     saverest
  643. *************************************************************************
  644.  
  645. wselect(1)
  646. wuse(9,40,7,10,color11)
  647. wframe(1)
  648. wprint(2,4,"Now, with  THE BREEZE,  You can")
  649. wprint(3,4,"write applications that include")
  650. wprint(4,4,"State-Of-The-Art technology....")
  651. wprint(5,4,"         WINDOWS !!")
  652. wprint(7,4,"       Press Any Key")
  653.  
  654. wselect(2)
  655. wuse(9,40,13,20,color10)
  656. wframe(2)
  657. wprint(2,4,"Opening a  Window is a BREEZE !!")
  658. wprint(3,4,"If you can  use  dBASE  already,")
  659. wprint(4,4,"don't worry, opening a window is")
  660. wprint(5,4,"as easy as opening a file.....")
  661.  
  662. wprint(7,4,"       Press Any Key")
  663.  
  664. wselect(3)
  665. wuse(8,40,16,30,color2)
  666. wframe(3)
  667. wprint(2,4,"You can USE up to 99 Windows at")
  668. wprint(3,4,"         ONCE !!")
  669. wprint(5,4,"       Press Any Key")
  670.  
  671.  
  672. *************
  673. ** Display section
  674. **
  675. *************
  676.  
  677. wdisplay(1)
  678. keycode()
  679. wdisplay(2)                  && Display the windows
  680. keycode()
  681. wdisplay(3)
  682. keycode()
  683.  
  684. wclose(3)
  685. wclose(2)          && close all 3
  686. wclose(1)
  687.  
  688.  
  689. wselect(1)
  690. wclear()
  691. wprint(3,4,"Screen design and management are")
  692. wprint(4,4,"     a BREEZE with windows !")
  693. wdisplay(1,0,0)
  694.  
  695.  
  696.  
  697. wselect(2)
  698. wclear()        
  699. wprint(3,4,"Screens FULL of information can be")
  700. wprint(4,4,"      overlayed, and restored")
  701. wprint(5,4,"             INSTANTLY !!")
  702. wdisplay(2,6,15)
  703.  
  704. wselect(3)
  705. wclear()
  706. wprint(2,4,"     ...And with THE BREEZE")
  707. wprint(3,4,"      Windows can MOVE....")
  708. wprint(4,4,"            FAST !!")
  709. wprint(6,4,"         Press Any Key")
  710. wdisplay(3,14,40)
  711.  
  712. keycode()
  713.  
  714.  
  715.  
  716. ****************************
  717. ** Window Demo
  718. **
  719. ****************************
  720.  
  721. wselect(4)
  722. wuse(10,30,10,5,color13)
  723. wframe(4)
  724. wprint(4,5,"This Is Window One !")
  725.  
  726. wselect(5)
  727. wuse(5,40,12,10,color11)
  728. wframe(5)
  729. wprint(2,10,"This is Window Two !")
  730.  
  731. wselect(6)
  732. wuse(5,40,14,20,color7)
  733. wprint(2,10,"This is Window Three !")
  734. wframe(1)
  735.  
  736. sound(500,10)
  737. wdisplay(4)
  738. sound(600,10)
  739. wdisplay(5)
  740. sound(800,10)
  741. wdisplay(6)
  742.  
  743. cntr = 0
  744. do while cntr < 250
  745.     cntr = cntr + 1
  746. enddo
  747.  
  748. sound(100,10)
  749. wclose(6)
  750. cntr = 0
  751. do while cntr < 250
  752.     cntr = cntr + 1
  753. enddo
  754. sound(100,10)
  755. wclose(5)
  756. cntr = 0
  757. do while cntr < 250
  758.     cntr = cntr + 1
  759. enddo
  760. sound(100,10)
  761. wclose(4)
  762.  
  763.  
  764. cntr = 1
  765. delaycntr = 150
  766.  
  767. do while cntr < 6
  768.  
  769.      sound(500,3)
  770.      wdisplay(4,1,1)
  771.      tmpcntr = 0
  772.      do while tmpcntr < delaycntr
  773.          tmpcntr = tmpcntr + 1
  774.      enddo
  775.      sound(800,5)
  776.      wclose(4)
  777.  
  778.  
  779.      sound(500,3)
  780.      wdisplay(5,10,35)
  781.      tmpcntr = 0
  782.      do while tmpcntr < delaycntr
  783.          tmpcntr = tmpcntr + 1
  784.      enddo
  785.      sound(800,5)
  786.      wclose(5)
  787.  
  788.      sound(500,3)
  789.      wdisplay(6,8,25)
  790.      tmpcntr = 0
  791.      do while tmpcntr < delaycntr
  792.          tmpcntr = tmpcntr + 1
  793.      enddo
  794.      sound(800,5)
  795.      wclose(6)
  796.  
  797.      sound(500,3)
  798.      wdisplay(4,14,5)
  799.      tmpcntr = 0
  800.      do while tmpcntr < delaycntr
  801.          tmpcntr = tmpcntr + 1
  802.      enddo
  803.      sound(800,5)
  804.      wclose(4)
  805.  
  806.      sound(500,3)
  807.      wdisplay(5,4,40)
  808.      tmpcntr = 0
  809.      do while tmpcntr < delaycntr
  810.          tmpcntr = tmpcntr + 1
  811.      enddo
  812.      sound(800,5)
  813.      wclose(5)
  814.  
  815.      sound(500,3)
  816.      wdisplay(6,14,35)
  817.      tmpcntr = 0
  818.      do while tmpcntr < delaycntr
  819.          tmpcntr = tmpcntr + 1
  820.      enddo
  821.      sound(800,5)
  822.      wclose(6)
  823.  
  824.      sound(500,3)
  825.      wdisplay(4,2,5)
  826.      tmpcntr = 0
  827.      do while tmpcntr < delaycntr
  828.          tmpcntr = tmpcntr + 1
  829.      enddo
  830.      sound(800,5)
  831.      wclose(4)
  832.  
  833.      sound(500,3)
  834.      wdisplay(5,14,25)
  835.      tmpcntr = 0
  836.      do while tmpcntr < delaycntr
  837.          tmpcntr = tmpcntr + 1
  838.      enddo
  839.      sound(800,5)
  840.      wclose(5)
  841.  
  842.     cntr = cntr + 1
  843.     delaycntr = delaycntr - 100
  844.  
  845. enddo
  846.  
  847. clear typeahead  
  848.  
  849. wclose(3)
  850. wclose(2)
  851. wclose(1)
  852.  
  853. ******************
  854. ** Text Section **
  855. ******************
  856. wselect(1)
  857. wrelease()
  858. wuse(10,40,0,0,color11)
  859. wframe(1)
  860. wprint(1,4,"Displaying AND Scrolling  Text  is")
  861. wprint(2,4,"     SIMPLE with THE BREEZE !     ")
  862. wprint(3,4,"All  of  the  windowing  functions")
  863. wprint(4,4,"Work relative  to the  window, NOT")
  864. wprint(5,4,"the screen.  The upper left corner")
  865. wprint(6,4,"of a window is  ALWAYS  coordinate")
  866. wprint(7,4,"0,0. This makes window positioning")
  867. wprint(8,4,"and printing incredibly EASY !!")
  868. wdisplay(1,0,20)
  869.  
  870.  
  871.  
  872. wselect(2)
  873. wclear()        
  874. wprint(1,4,"            AND                ")
  875. wprint(2,4,"With with  the  AUTOMATIC  'smart'")
  876. wprint(3,4,"wordwrap function  and the  window")
  877. wprint(4,4,"scrolling function, help  text  or")
  878. wprint(5,4,"any kind of text can be viewed and")
  879. wprint(6,4,"scrolled at one's leisure !!")
  880. wdisplay(2,11,2)
  881.  
  882. wselect(3)
  883. wclear()
  884. wprint(2,4,"       ...And of Course")
  885. wprint(3,4,"      These functions are")
  886. wprint(4,4,"          VERY  FAST !!")
  887. wprint(6,4,"         Press Any Key")
  888. wdisplay(3,14,40)        
  889.  
  890. keycode()
  891.  
  892. wclose()
  893. wclose(2)
  894. wclose(1)
  895.  
  896. wrelease(1)
  897. wrelease(2)
  898. wrelease(3)
  899. wrelease(4)                  && Release the Temporary windows
  900. wrelease(5)
  901. wrelease(6)
  902.  
  903. return
  904.  
  905. *****************************************************************************
  906. procedure popdowns
  907. *****************************************************************************
  908.  
  909.  
  910.  
  911. wselect(80)
  912. wuse(3,58,5,1,color9)
  913. wframe(2)
  914. wprint(1,2,"Menu 1")
  915. wprint(1,18,"Menu 2")
  916. wprint(1,33,"Menu 3")
  917. wprint(1,49,"Menu 4")
  918.  
  919. wcolor(color12)
  920. wprint(1,2,"Menu 1")
  921. wcolor(color9)
  922.  
  923. wdisplay()
  924. docode = .f.
  925. oldcntr = 1
  926. menucntr = 1
  927. code = 28
  928.  
  929. do while code <> 1
  930.  
  931.     if docode
  932.          code = keycode()
  933.     endif
  934.     docode = .t.
  935.  
  936.     oldcntr = menucntr
  937.     do case
  938.          case code = 75
  939.               menucntr = menucntr - 1
  940.          case code = 77
  941.               menucntr = menucntr + 1
  942.          case code = 28
  943.               menucntr = menucntr
  944.          otherwise
  945.                 loop
  946.     endcase
  947.  
  948.     if menucntr < 1
  949.          menucntr = 4
  950.     endif
  951.     if menucntr > 4
  952.          menucntr = 1
  953.     endif
  954.  
  955.     wcolor(color9)
  956.     do case
  957.          case oldcntr = 1
  958.               wprint(1,2,"Menu 1")
  959.          case oldcntr = 2
  960.               wprint(1,18,"Menu 2")
  961.          case oldcntr = 3
  962.               wprint(1,33,"Menu 3")
  963.          case oldcntr = 4
  964.               wprint(1,49,"Menu 4")
  965.     endcase          
  966.     wcolor(color12)
  967.  
  968.     do case
  969.          case menucntr = 1
  970.               wprint(1,2,"Menu 1")
  971.               do popone
  972.               if menucntr <> 1
  973.                    docode = .f.
  974.               endif
  975.          case menucntr = 2
  976.               wprint(1,18,"Menu 2")
  977.               do poptwo
  978.               if menucntr <> 2
  979.                    docode = .f.
  980.               endif
  981.          case menucntr = 3
  982.               wprint(1,33,"Menu 3")
  983.               do popthree
  984.               if menucntr <> 3
  985.                    docode = .f.
  986.               endif
  987.  
  988.          case menucntr = 4
  989.               wprint(1,49,"Menu 4")
  990.               do popfour
  991.               if menucntr <> 4
  992.                    docode = .f.
  993.               endif
  994.     endcase          
  995.  
  996.     wcolor(color9)
  997.     clear typeahead
  998.  
  999. enddo
  1000.  
  1001. wclose(80)
  1002. wrelease(80)
  1003. code = 28
  1004.  
  1005. return
  1006.  
  1007.  
  1008. ********************
  1009. procedure popone
  1010. ********************
  1011. wselect(81)
  1012. wuse(5,20,7,1,color9)
  1013. wframe(3)
  1014. wprint(1,6,"Choice 1")
  1015. wprint(2,6,"Choice 2")
  1016. wprint(3,6,"Choice 3")
  1017. wdisplay()
  1018.  
  1019. wcolor(color12)
  1020. wprint(1,6,"Choice 1")
  1021. s_code = 0
  1022. scntr = 1
  1023. soldcntr = 1
  1024. do while s_code <> 1 .and. menucntr = 1
  1025.  
  1026.     s_code = keycode()
  1027.  
  1028.     soldcntr = scntr
  1029.  
  1030.     do case
  1031.               case s_code = 72
  1032.                   scntr = scntr - 1
  1033.               case s_code = 80
  1034.                    scntr = scntr + 1
  1035.               case s_code = 28
  1036.                    scntr = scntr
  1037.               case s_code = 77
  1038.                    menucntr = 2
  1039.               case s_code = 75
  1040.                    menucntr = 4
  1041.               case s_code = 1
  1042.                    menucntr = menucntr
  1043.               otherwise
  1044.                    loop
  1045.     endcase
  1046.  
  1047.     if scntr < 1
  1048.          scntr = 3
  1049.     endif
  1050.     if scntr > 3
  1051.          scntr = 1
  1052.     endif
  1053.  
  1054.     wcolor(color9)
  1055.     do case
  1056.          case soldcntr = 1
  1057.               wprint(1,6,"Choice 1")
  1058.          case soldcntr = 2
  1059.               wprint(2,6,"Choice 2")
  1060.          case soldcntr = 3
  1061.               wprint(3,6,"Choice 3")
  1062.     endcase          
  1063.  
  1064.     wcolor(color12)
  1065.  
  1066.     do case
  1067.          case scntr = 1 
  1068.               wprint(1,6,"Choice 1")
  1069.          case scntr = 2
  1070.               wprint(2,6,"Choice 2")
  1071.          case scntr = 3
  1072.               wprint(3,6,"Choice 3")
  1073.     endcase          
  1074.     clear typeahead
  1075.  
  1076. enddo
  1077.  
  1078. wclose(81)
  1079. wrelease(81)
  1080.  
  1081. wselect(80)
  1082. wcolor(color9)
  1083. wprint(1,2,"Menu 1")
  1084. wcolor(color12)
  1085.     do case
  1086.          case menucntr = 1
  1087.               wprint(1,2,"Menu 1")
  1088.          case menucntr = 2
  1089.               wprint(1,18,"Menu 2")
  1090.          case menucntr = 3
  1091.               wprint(1,33,"Menu 3")
  1092.          case menucntr = 4
  1093.               wprint(1,49,"Menu 4")
  1094.     endcase          
  1095. wcolor(color9)
  1096. code = 28
  1097. return
  1098.  
  1099.  
  1100.  
  1101. ********************
  1102. procedure poptwo
  1103. ********************
  1104. wselect(81)
  1105. wuse(7,20,7,11,color9)
  1106. wframe(3)
  1107. wprint(1,6,"Choice 1")
  1108. wprint(2,6,"Choice 2")
  1109. wprint(3,6,"Choice 3")
  1110. wprint(4,6,"Choice 4")
  1111. wprint(5,6,"Choice 5")
  1112. wdisplay()
  1113.  
  1114. wcolor(color12)
  1115. wprint(1,6,"Choice 1")
  1116. s_code = 0
  1117. scntr = 1
  1118. soldcntr = 1
  1119. do while s_code <> 1 .and. menucntr = 2
  1120.  
  1121.     s_code = keycode()
  1122.  
  1123.     soldcntr = scntr
  1124.  
  1125.     do case
  1126.               case s_code = 72
  1127.                   scntr = scntr - 1
  1128.               case s_code = 80
  1129.                    scntr = scntr + 1
  1130.               case s_code = 28
  1131.                    scntr = scntr
  1132.               case s_code = 77
  1133.                    menucntr = 3
  1134.               case s_code = 75
  1135.                    menucntr = 1
  1136.               case s_code = 1
  1137.                    menucntr = menucntr
  1138.               otherwise
  1139.                    loop
  1140.     endcase
  1141.  
  1142.     if scntr < 1
  1143.          scntr = 5
  1144.     endif
  1145.     if scntr > 5
  1146.          scntr = 1
  1147.     endif
  1148.  
  1149.     wcolor(color9)
  1150.     do case
  1151.          case soldcntr = 1
  1152.               wprint(1,6,"Choice 1")
  1153.          case soldcntr = 2
  1154.               wprint(2,6,"Choice 2")
  1155.          case soldcntr = 3
  1156.               wprint(3,6,"Choice 3")
  1157.          case soldcntr = 4
  1158.               wprint(4,6,"Choice 4")
  1159.          case soldcntr = 5
  1160.               wprint(5,6,"Choice 5")
  1161.     endcase          
  1162.  
  1163.     wcolor(color12)
  1164.  
  1165.     do case
  1166.          case scntr = 1 
  1167.               wprint(1,6,"Choice 1")
  1168.          case scntr = 2
  1169.               wprint(2,6,"Choice 2")
  1170.          case scntr = 3
  1171.               wprint(3,6,"Choice 3")
  1172.          case scntr = 4
  1173.               wprint(4,6,"Choice 4")
  1174.          case scntr = 5
  1175.               wprint(5,6,"Choice 5")
  1176.  
  1177.     endcase          
  1178.     clear typeahead
  1179.  
  1180. enddo
  1181.  
  1182. wclose(81)
  1183. wrelease(81)
  1184.  
  1185. wselect(80)
  1186. wcolor(color9)
  1187. wprint(1,18,"Menu 2")
  1188. wcolor(color12)
  1189.     do case
  1190.          case menucntr = 1
  1191.               wprint(1,2,"Menu 1")
  1192.          case menucntr = 2
  1193.               wprint(1,18,"Menu 2")
  1194.          case menucntr = 3
  1195.               wprint(1,33,"Menu 3")
  1196.          case menucntr = 4
  1197.               wprint(1,49,"Menu 4")
  1198.     endcase          
  1199. wcolor(color9)
  1200. code = 28
  1201. return
  1202.  
  1203. ********************
  1204. procedure popthree
  1205. ********************
  1206. wselect(81)
  1207. wuse(5,20,7,27,color9)
  1208. wframe(3)
  1209. wprint(1,6,"Choice 1")
  1210. wprint(2,6,"Choice 2")
  1211. wprint(3,6,"Choice 3")
  1212. wdisplay()
  1213.  
  1214. wcolor(color12)
  1215. wprint(1,6,"Choice 1")
  1216. s_code = 0
  1217. scntr = 1
  1218. soldcntr = 1
  1219. do while s_code <> 1 .and. menucntr = 3
  1220.  
  1221.     s_code = keycode()
  1222.  
  1223.     soldcntr = scntr
  1224.  
  1225.     do case
  1226.               case s_code = 72
  1227.                   scntr = scntr - 1
  1228.               case s_code = 80
  1229.                    scntr = scntr + 1
  1230.               case s_code = 28
  1231.                    scntr = scntr
  1232.               case s_code = 77
  1233.                    menucntr = 4
  1234.               case s_code = 75
  1235.                    menucntr = 2
  1236.               case s_code = 1
  1237.                    menucntr = menucntr
  1238.               otherwise
  1239.                    loop
  1240.     endcase
  1241.  
  1242.     if scntr < 1
  1243.          scntr = 3
  1244.     endif
  1245.     if scntr > 3
  1246.          scntr = 1
  1247.     endif
  1248.  
  1249.     wcolor(color9)
  1250.     do case
  1251.          case soldcntr = 1
  1252.               wprint(1,6,"Choice 1")
  1253.          case soldcntr = 2
  1254.               wprint(2,6,"Choice 2")
  1255.          case soldcntr = 3
  1256.               wprint(3,6,"Choice 3")
  1257.     endcase          
  1258.  
  1259.     wcolor(color12)
  1260.  
  1261.     do case
  1262.          case scntr = 1 
  1263.               wprint(1,6,"Choice 1")
  1264.          case scntr = 2
  1265.               wprint(2,6,"Choice 2")
  1266.          case scntr = 3
  1267.               wprint(3,6,"Choice 3")
  1268.     endcase          
  1269.     clear typeahead
  1270.  
  1271. enddo
  1272.  
  1273. wclose(81)
  1274. wrelease(81)
  1275.  
  1276. wselect(80)
  1277. wcolor(color9)
  1278. wprint(1,33,"Menu 3")
  1279. wcolor(color12)
  1280.     do case
  1281.          case menucntr = 1
  1282.               wprint(1,2,"Menu 1")
  1283.          case menucntr = 2
  1284.               wprint(1,18,"Menu 2")
  1285.          case menucntr = 3
  1286.               wprint(1,33,"Menu 3")
  1287.          case menucntr = 4
  1288.               wprint(1,49,"Menu 4")
  1289.     endcase          
  1290. wcolor(color9)
  1291. code = 28
  1292. return
  1293.  
  1294. ********************
  1295. procedure popfour
  1296. ********************
  1297. wselect(81)
  1298. wuse(7,20,7,44,color9)
  1299. wframe(3)
  1300. wprint(1,6,"Choice 1")
  1301. wprint(2,6,"Choice 2")
  1302. wprint(3,6,"Choice 3")
  1303. wprint(4,6,"Choice 4")
  1304. wprint(5,6,"Choice 5")
  1305. wdisplay()
  1306.  
  1307. wcolor(color12)
  1308. wprint(1,6,"Choice 1")
  1309. s_code = 0
  1310. scntr = 1
  1311. soldcntr = 1
  1312. do while s_code <> 1 .and. menucntr = 4
  1313.  
  1314.     s_code = keycode()
  1315.  
  1316.     soldcntr = scntr
  1317.  
  1318.     do case
  1319.               case s_code = 72
  1320.                   scntr = scntr - 1
  1321.               case s_code = 80
  1322.                    scntr = scntr + 1
  1323.               case s_code = 28
  1324.                    scntr = scntr
  1325.               case s_code = 77
  1326.                    menucntr = 1
  1327.               case s_code = 75
  1328.                    menucntr = 3
  1329.               case s_code = 1
  1330.                    menucntr = menucntr
  1331.               otherwise
  1332.                    loop
  1333.     endcase
  1334.  
  1335.     if scntr < 1
  1336.          scntr = 5
  1337.     endif
  1338.     if scntr > 5
  1339.          scntr = 1
  1340.     endif
  1341.  
  1342.     wcolor(color9)
  1343.     do case
  1344.          case soldcntr = 1
  1345.               wprint(1,6,"Choice 1")
  1346.          case soldcntr = 2
  1347.               wprint(2,6,"Choice 2")
  1348.          case soldcntr = 3
  1349.               wprint(3,6,"Choice 3")
  1350.          case soldcntr = 4
  1351.               wprint(4,6,"Choice 4")
  1352.          case soldcntr = 5
  1353.               wprint(5,6,"Choice 5")
  1354.     endcase          
  1355.  
  1356.     wcolor(color12)
  1357.  
  1358.     do case
  1359.          case scntr = 1 
  1360.               wprint(1,6,"Choice 1")
  1361.          case scntr = 2
  1362.               wprint(2,6,"Choice 2")
  1363.          case scntr = 3
  1364.               wprint(3,6,"Choice 3")
  1365.          case scntr = 4
  1366.               wprint(4,6,"Choice 4")
  1367.          case scntr = 5
  1368.               wprint(5,6,"Choice 5")
  1369.  
  1370.     endcase
  1371.     clear typeahead
  1372.  
  1373. enddo
  1374.  
  1375. wclose(81)
  1376. wrelease(81)
  1377.  
  1378. wselect(80)
  1379. wcolor(color9)
  1380. wprint(1,49,"Menu 4")
  1381. wcolor(color12)
  1382.     do case
  1383.          case menucntr = 1
  1384.               wprint(1,2,"Menu 1")
  1385.          case menucntr = 2
  1386.               wprint(1,18,"Menu 2")
  1387.          case menucntr = 3
  1388.               wprint(1,33,"Menu 3")
  1389.          case menucntr = 4
  1390.               wprint(1,49,"Menu 4")
  1391.     endcase          
  1392. wcolor(color9)
  1393. code = 28
  1394. return
  1395.